package edu.xalead;

import org.springframework.stereotype.Component;

import javax.annotation.Resource;

@Component
public class PersonService {
    @Resource
    private PersonInterface person = (PersonInterface) new DynaProxy(new Person()).createProxy();
    @Resource(name = "sss")
    private Ser ser;
    private StudentInterface student = (StudentInterface) new DynaProxy(new Student()).createProxy();


    public void service(){
//        ser.chifan();
//        ser.chuanyifu();//代码太多重复 通过代理
        person.lvyou();
//        ser.chifan();
//        ser.chuanyifu();
        person.shangban();
//        ser.chifan();
//        ser.chuanyifu();
        person.tanqin();
    }
}
